package uk.org.scuts.bantstadium2;

import android.os.Bundle;
import android.os.Process;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

public class ActivityMain extends Activity {

	// Methods
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	menu.add(0, 99, 99, "Exit");
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item)
    {
    	switch(item.getItemId())
    	{
    	case 99:
    		Process.killProcess(Process.myPid());
    		return true;
    	}
    	return super.onOptionsItemSelected(item);
    }
    
    // Button listeners
    public void StartQuickBattle (View view)
    {
    	Intent qb = new Intent(this, ActivityQuickBattle.class);
    	this.startActivity(qb);
    }
    
    public void StartCustomise (View view)
    {
    	Intent cust = new Intent(this, ActivityCustomise.class);
    	this.startActivity(cust);
    }
    
    public void Bye (View view)
    {
    	Process.killProcess(Process.myPid());
    }
    
}
